#include<bits/stdc++.h>
using namespace std;
double hermite(double,int);
int main()
{
	double x;
	int n;
	cin>>x>>n;
	if (hermite(x,n)==-1) cout<<"error"<<endl;
	else cout<<fixed<<setprecision(2)<<hermite(x,n)<<endl;
	return 0;
}

double hermite(double x,int n)
{
	if (n==0) return 1;
	else if (n==1) return 2*x;
	else if (n<0) return -1;
	else return 2*x*hermite(x,n-1)-2*(n-1)*hermite(x,n-2);
}